<?php
namespace Admin\Controller;
use Admin\Controller\BaseController;
class ClassfiesController extends BaseController {
	private $tbl;
	public function _initialize(){
		$this->tbl='classfies';
		$this->model=D($this->tbl);
		parent::_initialize();
	}
    public function index(){
		parent::index($this->tbl);
    }
	public function	view(){
		$id=I('get.id');//获取id
	}
	public function mod(){//修改界面
		 parent::mod($this->tbl,"id");
	}
	public function update(){//修改
		$id=I('post.id');
		$name=I('post.name');
		$Dao = M("goods");
		$result = $Dao->where("cid = '{$id}'")->setField('cname',$name);
		parent::update($this->tbl,"pic");
	}
	public function delete(){//删除
		parent::delete($this->tbl,"id","pic");
	}
	public function form(){//添加界面
		parent::form($this->tbl);
	}
	public function add(){//添加
		parent::add($this->tbl,"pic");
	}
	public function search(){
		parent::search($this->tbl,"realname");
	}
}